﻿<h2>Add Skills - Vacancy ID: {{ model.vacancy_id }}</h2>

<form class="navbar-form navbar-left" role="search" ng-submit="add(model)">
    <div class="form-group">
        <input type="hidden" ng-model="model.vacancy_id" />
        <input type="text" class="form-control" placeholder="Enter skill" ng-model="model.skill_id" required />
        <input type="checkbox" ng-true-value="Y" ng-false-value="N" ng-model="model.optional" /> Optional   
    </div>
    <button type="submit" class="btn btn-warning">Add Skill</button>
</form>

<div class="row">
    <table class="table table-condensed table-hover">
        <tr>
            <th>Vacancy ID</th>
            <th>Skill</th>
            <th>Optional</th>
            <th></th>
        </tr>
        <tr ng-repeat="skill in skills">
            <td>{{skill.vacancy_id}}</td>
            <td>{{skill.skill_id}}</td>
            <td>
                <input type="checkbox" ng-true-value="'Y'" ng-false-value="'N'" ng-checked="skill.optional=='Y'" disabled /></td>
            <td>
                <img src="../img/Delete_16x16.png" alt="Delete" ng-click="delete(skill)" /></td>
        </tr>
    </table>
    <p align="right"><a href="/Vacancy/List">
        <button id="back" name="back" class="btn btn-success">Go Back</button></a></p>
</div>
